<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    // 案例 异步条件下接口异常捕捉 工作中常用
    const params = {}
    this.$http.get((params))
    .then(res => {
        console.log(res);
    })
    .catch(err => {
        console.log(err);
    }).finally(() => {

    })
    this.$http.post((params))
    .then(res => {
        console.log(res);
    })
    .catch(err => {
        console.log(err);
    }).finally(() => {

    })
    // 异常捕捉 
    // await async怎么捕捉异常
</body>
</html>